package dataStructure;

public class BinaryTreeNode<T> {
    private T data;
    private BinaryTreeNode<T> left;
    private BinaryTreeNode<T> right;

    public BinaryTreeNode(T data) {
        this.data = data;
    }

    //获取数据
    public T getData() {
        return data;
    }

    //设置数据
    public void setData(T data) {
        this.data = data;
    }

    //获取左子树
    public BinaryTreeNode<T> getLeft() {
        return left;
    }

    //设置左子树
    public void setLeft(BinaryTreeNode<T> left) {
        this.left = left;
    }

    //获取右子树
    public BinaryTreeNode<T> getRight() {
        return right;
    }

    //设置右子树
    public void setRight(BinaryTreeNode<T> right) {
        this.right = right;
    }
}
